
<div class="container">

    <?php
    include 'member-left.php';
    include 'member-right.php';
    $rsSearch = $member->searchMember();
    ?>

    <div class="member_c">
        <?php
        if($rsSearch['rs']){
        ?>
        <div class="listnews">
            <div class="title_module">
                <h5 class="hover-act-img">Kết quả tìm kiếm</h5>
            </div>
            <ul class="searchFriendResult">
                <?php
                while ($row = $db->fetch_array($rsSearch['rs'])) {
                    ?>
                    <li>
                        <div class="left">
                            <img class="avatar" src="<?php echo $common->get_avatar_thumb($row['avatar']); ?>"/>
                        </div>
                        <div class="left">
                            <p>
                            <h3><a href="<?php echo DOMAIN . "/thanh-vien?mid=" . $row['id']; ?>"><?php echo $row['fullname'];?></a></h3>
                            <span>
                                <span class="icon"><img src="/images/add-friend.png" alt="<?php echo $row['fullname'];?>"></span>
                                <a rel="<?php echo $row['id'];?>" alt="<?php echo $row['fullname'];?>" class="btnAddFriend" href="javascript:void(0);">Kết bạn</a>
                            </span>
                            </p>
                        </div> 
                    </li>
                <?php } ?>
            </ul>
        </div>
        <?php }else{?>
        <div class="listnews">
            <div style="height: 400px;text-align: center">
                <h4 style="color: red; padding-top: 150px;">Không tìm thấy kết quả phù hợp</h4>
            </div>
        </div>
        <?php }?>
        <?php
        if($rsSearch['totalPage']>1){
        ?>
        <div class="bt_right">
            <span class="right">
                <?php if($rsSearch['page']==1){?>Trang trước<?php }else{?> <a rel="nofollow" href="/thanh-vien?mid=<?php echo $_SESSION['client']['id'];?>&action=timban&keyword=<?php echo str_replace(' ', '+', $_GET['keyword']); if($rsSearch['page']>1){echo '&page='.($rsSearch['page']-1);} ?>" class="pre" >Trang trước </a> <?php }?> | <?php if($rsSearch['page']==$rsSearch['totalPage']){?>Trang sau<?php }else{?> <a rel="nofollow" href="/thanh-vien?mid=<?php echo $_SESSION['client']['id'];?>&action=timban&keyword=<?php echo str_replace(' ', '+', $_GET['keyword']); if($rsSearch['page']<$rsSearch['totalPage']){echo '&page='.($rsSearch['page']+1);} ?>" class="pre" >Trang sau </a> <?php }?>
            </span>
        </div>
        <?php } ?>

    </div>

</div>
<script src="/js/home.js" type="text/javascript"></script>
